/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model;

import java.sql.Connection;
import java.sql.Statement;
import oracle.jdbc.pool.OracleDataSource;

/**
 *
 * @author BENY as User
 */
public class Conection {public static Connection open(String url, String name, String pass) {
        Connection con = null;
        try {
            OracleDataSource ods = new OracleDataSource();
            ods.setURL(url);
            con = ods.getConnection(name, pass);
            Statement stat = con.createStatement();
            System.out.println("Connection OK");
        } catch (Exception e) {
            System.out.println("error: " + e.getMessage());
        }
        return con;
    }
}


